package aooO.crm.common.Utils;

import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFSheet;

/****
 * 实现判断，取出对应格子里的内容
 */
public class HSSFUtils {
    //统一返回String类型，需要再转化
    public static String getValue(HSSFCell cell){
        String value="";
          if (cell.getCellType()== HSSFCell.CELL_TYPE_BOOLEAN){
              value=cell.getBooleanCellValue()+"";
          }else if (cell.getCellType()==HSSFCell.CELL_TYPE_STRING){
              value=cell.getStringCellValue()+"";
          }else if (cell.getCellType()==HSSFCell.CELL_TYPE_NUMERIC){
              value=cell.getNumericCellValue()+"";
          }else {
                  value="";
        }
                return value;
    }
}
